package com.gitee.dbswitch.data.domain;

import com.gitee.dbswitch.core.task.TaskResult;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * 读取api http 请求线程的出参
 *
 * @author natural
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class APITaskResult implements TaskResult {


    @Builder.Default
    private Map<String, Long> perf = new HashMap<>();

    @Builder.Default
    private Map<String, Throwable> except = new HashMap<>();

    private String APIResponse;

    private boolean success;

    private long successCount;

    private long failureCount;

    private long recordCount;

    private long totalBytes;

    private Throwable throwable;

    @Override
    public void padding() {

    }


}
